home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / qbatb503.zip / HELP.ZIP / WINDOWS.HLP < prev   
Text File  |  1990-10-25  |  5KB  |  143 lines

  1. ┌────────────────────────────────────────────────────┐
  2. │                       WINDOWS                      │
  3. └────────────────────────────────────────────────────┘
  4.  
  5. What are Windows?  Well, if you've used the QuickBASIC
  6. environment at all, then you've used Windows. When you
  7. press  <ALT><F>  to bring down the File Menu, the list
  8. of options presented there is in a window.  Notice how
  9. any characters which were concealed when the File Menu
  10. appeared, are restored, intact, after you've made your
  11. choice. Windows are areas of the screen which are used
  12. to hold transient data and messages to the user.  They
  13. make  the most of the limited display space  available
  14. and remove the need to  constantly rebuild the screen,
  15. each time your program communicates with the world.
  16.  
  17. Properly  presented,  windows can give the illusion of
  18. multi-tasking,  even on single-processor machines like
  19. the Tandy 1000 and IBM-PC.
  20.  
  21. Nowadays,  no program worth its' salt can be without a
  22. window of some kind. If YOUR program is going to stand
  23. out amongst all the others, however, they've got to be
  24. done professionally. Windows must appear instantly and
  25. vanish, just as quickly, when no longer required. They
  26. must be as large or as small as is necessary,  for the
  27. data which you need to display,  and you should have a
  28. plentiful supply,  for all the circumstances that your
  29. program might encounter. BASIC, unfortunately, is just
  30. not fast enough to meet all these requirements.
  31.  
  32. Looks like it'll have to be assembler again ...
  33.  
  34. The  WINDOWS Library contains a set of 8088/8 Assembly
  35. Language routines,  which enable you include versatile
  36. windowing features in your QuickBASIC programs.
  37. To use  WINDOWS,  you must include two declarations at
  38. the beginning of your program's source code:
  39.  
  40. DECLARE SUB PopUp (Y%, X%, H%, W%, A%, B%, S%, Z%)
  41. DECLARE SUB ShutUp ()
  42.  
  43. You must also link WINDOWS.LIB to your compiled object
  44. file, with the command
  45.  
  46.            LINK yourprog,,,WINDOWS.LIB
  47.  
  48.  
  49. When developing programs in the QuickBASIC environment
  50. you can include WINDOWS in your Quick Library by using
  51. the Linker instruction:
  52.  
  53.  LINK /QU WINDOWER.OBJ ..., yourprog.QLB,,BQLB40.LIB;
  54.  
  55.    (include whatever other .OBJ modules you need)
  56.  
  57. Then start up QuickBASIC with the command:
  58.  
  59.            QB yourprog.bas /L yourprog.qlb 
  60.  
  61. Thereafter, you can open windows from anywhere in your
  62. program by issuing the statement:
  63.  
  64.     PopUp P1%, P2%, P3%, P4%, P5%, P6%, P7%, P8%
  65.  
  66.  
  67. Where:    P1%  is the top-left row co-ordinate
  68.           P2%  is the top-left column co-ordinate
  69.           P3%  is the height (in rows) of the window
  70.           P4%  is the width (in columns) of the window
  71.           P5%  is the display attribute or colour
  72.           P6%  is the border style (0 = no border)
  73.           P7%  is the shadow switch (0 = no shadow)
  74.           P8%  is the zoom switch (0 = no zoom)
  75.  
  76. See  the COLOURS topic for more information on  screen
  77. attributes and colours.
  78.  
  79.  
  80.  
  81. ┌────────────────────────────────────────────────────┐
  82. │                  BORDER STYLES                     │
  83. └────────────────────────────────────────────────────┘
  84.  
  85. ┌────┐
  86. │ 1. │    Single-lined box all round the window
  87. └────┘
  88. ╔════╗
  89. ║ 2. ║    Double-lined box all round the window
  90. ╚════╝
  91. ╒════╕
  92. │ 3. │    Single vertical, double horizontal
  93. ╘════╛
  94. ╓────╖
  95. ║ 4. ║    Single horizontal, double vertical
  96. ╙────╜
  97.  
  98. The SHADOW switch (Parameter 7),  can be used to add a
  99. black shadow underneath your window, Giving it a three
  100. dimensional effect. Setting P7% to 1,  puts the shadow
  101. on the left-hand side. Setting P7% to 2 puts it on the
  102. right. Any other value prevents shadow.
  103.  
  104. Setting Parameter 8 to 1 will cause the window to ZOOM
  105. onto the screen.  What this means is that, starting at
  106. a  point  source,  successively larger versions of the
  107. window will be drawn until it is the size required.
  108.  
  109. The process is extremely fast and impressive, and adds
  110. a very professional touch to your programs.
  111.  
  112.  
  113. Before  a window is opened,  the display area below it
  114. is copied to an internal buffer, from where it will be
  115. eventually  restored  when the window is closed.  This
  116. buffer  has a capacity of 8 KiloBytes,  the equivalent
  117. of two full screens. To calculate the storage required
  118. for a particular window, use the formula:
  119.  
  120. Bytes = ((Height in rows * Width in columns) * 2) + 6
  121.  
  122. (add one row to the height and one column to the width
  123. if you specify shadow)
  124.  
  125. The window area needs to be multiplied by 2 since each
  126. screen character takes two bytes of memory, for itself
  127. and its attribute code. The odd six bytes are required
  128. for the storage of buffer pointers.
  129. The  window buffer works as a LIFO stack,  so that the
  130. last window opened is the first one to be removed. You
  131. can close the current window with the statement:
  132.  
  133.         CALL ShutUp
  134.  
  135. To put text inside a window, use the fast screen print
  136. routines from the ASSEMBLY Library.  This library also
  137. has a pair of routines, SCROLLUP and SCROLLDOWN, which
  138. you can use to clear all or part of an open window.
  139.  
  140. ┌────────────────────────────────────────────────────┐
  141. │ (c) 1988 By Christy Gemmell and Singular SoftWare. │
  142. └────────────────────────────────────────────────────┘
  143.